bertin.draw({
params: {
projection: proj,
margin: 15,
},
layers: [
{
type: "header",
text: "Population Density in Switzerland",
fill: "#222222",
anchor: "left",
fontSize: 40,
},
{
type: "text",
text: "The New Tool Way, Spikes with Bertin.js",
position: "topleft",
fill: "#444444",
fontSize: 24,
fontStyle: "italic",
margin: 0,
frame_fill: "#FFFFFF"
},
{
type: "footer",
text: "Data: BFS · Map: Cédric Vidonne · #30DayMapChallenge",
anchor: "left",
fill: "#666666",
fontSize: 16,
},
{
type: "layer",
geojson: country,
fill: "#000000",
fillOpacity: 0.1,
stroke: "none"
},
{
type: "spikes",
geojson: pop_spike,
values: "value",
fill: "#f26829",
fillOpacity: 0.2,
stroke: "#f26829",
k: 100,
w: 8,
leg_x: 20,
leg_y: 50,
leg_fontSize: 14,
leg_fontSize2: 12,
leg_round: 0,
leg_title: `Inhabitants
by km²`
},
// { type: "graticule" },
// { type: "outline" }
]
})